package com.leanyuan.check.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leanyuan.check.dao.PositionplanMapper_C;
import com.leanyuan.check.domain.Positionplan;
import com.leanyuan.check.dto.Positionplandto;
import com.leanyuan.check.service.PositionplanService_C;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
@Service
public class PositionplanServiceCImpl_C extends ServiceImpl<PositionplanMapper_C, Positionplan> implements PositionplanService_C {

    @Autowired
    PositionplanMapper_C positionplanMapperC;


    public Page<Positionplandto> InspectiondtolistPage(Integer page, Integer size) {
        // 构造分页参数
        Page<Positionplandto> pages = new Page<Positionplandto>(page, size);
        Positionplandto positionplandto=new Positionplandto();
        positionplandto.setPositionplan_name("%%");
        positionplandto.setPlancondition("启用");
        return this.positionplanMapperC.selectSamplePageVoPage(pages, positionplandto);
    }


    public Page<Positionplandto> InspectiondtolistPage1(Integer page, Integer size, Positionplandto positionplandto) {
        // 构造分页参数
        Page<Positionplandto> pages = new Page<Positionplandto>(page, size);
        // baseMapper就是指代的TbSampleMapper类。
        String name=positionplandto.getPositionplan_name();
        positionplandto.setPositionplan_name("%"+name+"%");
        return this.positionplanMapperC.selectSamplePageVoPage(pages, positionplandto);
    }
}
